<%@ page language="java" 
 import="com.jju.A1541.dao.UserDAO" 
   import="java.util.*"
   import="com.jju.A1541.model.*"
contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String username = request.getParameter("username");
String tel = request.getParameter("tel");
User wjmm = UserDAO.wjmm(username,tel);
if(wjmm!=null){
String keyword="";
String keyword1="";
List<User> data =null;
//区分访问该页面是直接访问 还是表单查询提交
if(request.getParameter("username")==null || request.getParameter("tel")==null ){
  data =UserDAO.getAll(); //取所有记录
} else { //传递了关键字,根据关键字查询
  keyword = request.getParameter("username");
  keyword1 = request.getParameter("tel"); 
//通过String类的构造方法，指定的字符串为“UTF-8”编码
   keyword= new String(keyword.getBytes("ISO-8859-1"),"UTF-8");
  data =UserDAO.getByKeyword(keyword,keyword1);
}
      //遍历系统中所有的捐赠信息
     for(User obj:data){
     	 out.println("<tr>");
     	 out.println("<td>"+"</td>");
     	 out.println("<td>您的密码是："+obj.getPassword()+"</td>");
     	 out.println("<td>"+"<a href='login.jsp'>返回登录</a> "+"</td>");
     	 out.println("</tr>");
     }
}
%>